<?php
require_once('config.php');
//lets create some usefull variables
$action = @$_POST['action'];
$uName = $_POST['name'];
$uDob = $_POST['dob'];
$uDod = $_POST['dod'];
$uStatus = $_POST['status'];
$uArrow = $_POST['arrow'];
$uAText = $_POST['arrowText'];
$uText = $_POST['text'];
if($action == "updateFrame") {

//create fopen handler for opening data file for writing
$fh = fopen($frameDataFile, 'w') or die("can't open file");
//lets create our string to be written to the file
$uFrameDataString = $uName . "|" . $uDob . "|" . $uDod . "|" . $uStatus . "|" . $uArrow;
echo "<script language='javascript'>alert('" . $uFrameDataString . "');</script>";    //testing only!!!

fwrite($fh, $uFrameDataString);
fclose($fh);

if(!$IFS_writing){
header("Location: admin.php?msg=Updated+frame+successfully!");
}
else{
header("Location: admin.php?msg=An+error+occured!");
}
}

?>